fbe7b8d3b3ccfdad4bd73834a216be550ebb90a7,src/main/java/mcp/mobius/waila/addons/capability/HUDHandlerInventory.java,HUDHandlerInventory,getNBTData,#EntityPlayerMP#TileEntity#NBTTagCompound#World#BlockPos#,71
Before Change
if (te.hasCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null)) {
IItemHandler itemHandler = te.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null);
tag.setTag("handler", invToNBT(itemHandler));
tag.setInteger("handlerSize", itemHandler.getSlots());
} else if (te instanceof IInventory) {
IItemHandler itemHandler = new InvWrapper((IInventory) te);
tag.setTag("handler", invToNBT(itemHandler));
After Change
tag.removeTag("Items"); // Should catch all inventories that do things the standard way. Keeps from duplicating the item list and doubling the packet size
if (te.hasCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null)) {
IItemHandler itemHandler = te.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null);
tag.setTag("handler", InventoryUtils.invToNBT(itemHandler, player.isSneaking() ? itemHandler.getSlots() : 5));
tag.setInteger("handlerSize", player.isSneaking() ? itemHandler.getSlots() : 5);
} else if (te instanceof IInventory) {
IItemHandler itemHandler = new InvWrapper((IInventory) te);